<html>
    <head>
        <title>
            后台登陆
        </title>
        <meta charset="utf-8">
        <link href="web/css/bootstrap-3.2.0.min.css" rel="stylesheet" type="text/css"/>      
    </head>
    <body>
        <div style="width:600px; height:600px; border:1px solid #ccc; border-radius: 6px; margin:50px auto;">
            <h1>&nbsp&nbsp指冠网后台登陆<h1>
                <div class="form-group">
                    <div class="col-sm-10">
                        <input type="text" name="username" class="form-control" id="inputEmail3" placeholder="用户名">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-10">
                        <input type="password" name="password" class="form-control" id="inputPassword3" placeholder="密码">
                    </div>
                </div>              
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button class="btn btn-default submit">登录</button>
                    </div>
                </div>
        </div>
    </body>
    <script src="web/js/jquery-2.1.1.min.js"></script>
    <script src="web/js/bootstrap-3.2.0.min.js"></script>
    <script>
        $(function () {
            $(".submit").click(function () {
                $.ajax({
                    url: 'index.php?c=admin&a=login',
                    type: 'post',
                    data: {
                        username:$("input[name='username']").val(),
                        password:$("input[name='password']").val(),
                    },
                    success: function (result) {      
                        if(result==0){
                            alert("no");
                        }else{
                            location.href="index.php?c=admin&a=index";
                        }
                    }
                })
            })
        })
    </script>
</html>